package org.vaadin.nf4v.core.handler;

import org.vaadin.nf4v.core.navigation.InvalidUriException;

/**
 * Handles invalid uri: when page could not be found for uri fragment or params part could not be parsed.
 * UriHandler and ParamsResolver indicates wrong uris by throwing InvalidUriException.
 * <p/>
 * OVERRIDING: may be overridden for context.
 */
public interface InvalidUriHandler extends Handler {

    /**
     * Handles invalid uri.
     *
     * @param fragment bad uri fragment
     * @param ex       exception thrown by UriHandler or ParamsResolver
     */
    void handleInvalidUri(String fragment, InvalidUriException ex);
}
